package mystackgather;



import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.*;
import java.text.*;


public class Main1{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int year = sc.nextInt();
            int[] month = new int[]{1,2,5,9,11};
            int len = month.length;
            int wek[] = new int[len];
//             创建 Calendar 对象
            Calendar cal = Calendar.getInstance();
            try{
//                 对 Calendar 设置时间的方法
//                 设置传入的时间格式
                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-M-d");
                for(int i = 0;i < len;i++){
//                     指定一个日期
                    Date date = dateFormat.parse(year+"-"+month[i]+"-1");
//                     对 calendar 设置为 date 所指定的日期
                    cal.setTime(date);
//                     每月1号为位于星期几
                    int week = cal.get(Calendar.DAY_OF_WEEK)-1;
                    if(week == 0) week = 7;
                    wek[i] = week;
                }
            } catch(Exception e){
                e.printStackTrace();
            }
            System.out.println(year + "-01-01");
//             1月的第三个星期一
            int january = wek[0];
            int rs = 0;
            String strRs ="";
            if(january == 1){
                rs = 2 * 7 + 1;
            }else{
                rs = 3 * 7 - (january -1)+1;
            }
            strRs = rs/10 == 0 ?"0"+rs : String.valueOf(rs);
            System.out.println(year+"-01-"+ strRs);
//             2月的第三个星期一
            int february = wek[1];
            if(february == 1){
                rs = 2 * 7 +1;
            }else{
                rs = 3 * 7 - (february-1)+1;
            }
            strRs = rs/10 == 0 ?"0"+rs : String.valueOf(rs);
            System.out.println(year+"-02-"+ strRs);
//             5月的最后一个星期一
            int may = wek[2];
            if(may >= 6){
//                 第五个星期一
                rs = may == 6 ? 31 : 30;
            }else{
//                 第4个星期一
                rs = 4 * 7 - (may-1)+1;
            }
            strRs = rs/10 == 0 ?"0"+rs : String.valueOf(rs);
            System.out.println(year+"-05-"+ strRs);
            System.out.println(year+"-07-04");
//             9月的第一个星期一
            int september = wek[3];
            if(september == 1){
                rs = 1;
            }else{
                rs = 1 * 7 - (september-1)+1;
            }
            strRs = rs/10 == 0 ?"0"+rs : String.valueOf(rs);
            System.out.println(year+"-09-"+ strRs);
//             11 月的第四个星期四
            int november =wek[4];
            rs = 4 * 7 - (november - 1) + 4;
            strRs = rs/10 == 0 ?"0"+rs : String.valueOf(rs);
            System.out.println(year+"-11-"+ strRs);
            System.out.println(year+"-12-25");
            System.out.println();
        }
    }

}
